package myadmin.jtthink.com.Mapper;


import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import myadmin.jtthink.com.Models.BookModel;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@DS("queryDS")
@Repository
public interface BooksMapper extends BaseMapper<BookModel> {
    @Select("select  book_id , book_name , " +
            "book_price1  , book_kind ,b.kind_name " +
            "from books a inner join book_kinds b on a.book_kind=b.kind_id   ${ew.customSqlSegment}")
    public List<BookModel> selectBookByCid(Page<BookModel> page, @Param(Constants.WRAPPER) Wrapper wrapper);


}

